"""
标记、线条样式和颜色
fmt = '[marker][line][color]'
"""

import matplotlib.pyplot as plt

x = list(range(5))  # 1~10
y = [2 * i for i in x]

rows = 2
cols = 2
fig, axs = plt.subplots(rows, cols, figsize=(10, 10))

Line_Sahpe = [
    "-",  # 实线
    ":",  # 虚线
    "--",  # 破折线
    "-.",  # 点划线
]

Colors = [
    "r",    # 红色
    "g",    # 绿色
    "b",    # 蓝色
    "c",    # 青色
    "m",    # 品红色
    "y",    # 黄色
    "k",    # 黑色
    "w",    # 白色
]

for row in range(rows):
    for col in range(cols):
        index = row * cols + col
        if index < len(Line_Sahpe):
            fmt = f"{Line_Sahpe[index]}{Colors[index]}"
            print(f"形状_颜色: {fmt}")
            axs[row, col].plot(x, y, fmt)
        else:
            break
plt.show()
